<?php
namespace Libs\Common;

class RelationshipCommon
{
    /**
     * Convert Status Relationship of facebook to status of master data
     * @author ThamLT
     * */
    public static function convertFacebookRelationship($status)
    {
        $aryFbRelationship = array(
                                    'Single'                    => 1,
                                    'In a relationship'         => 99,
                                    'Engaged'                   => 99,
                                    'In an open relationship'   => 3,
                                    'It\'s complicated'         => 2,
                                    'Separated'                 => 99,
                                    'Divorced'                  => 5,
                                    'Widowed'                   => 4
                                   );

        if (!empty($aryFbRelationship[$status])) {
            return $aryFbRelationship[$status];
        }
        return 0;
    }
}
